﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using Model;

namespace BLL
{
    /// <summary>
    /// 社团业务逻辑类
    /// </summary>
    public class ClubBLL
    {
        ClubDAL clubDAL = new();

        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        public DataTable GetAllClubs()
        {
            return clubDAL.GetAllClubs();
        }
        public List<Club> GetAllClubList()
        {
            return clubDAL.GetAllClubList();
        }

        public Club? GetClubById(int id)
        {
            return clubDAL.GetClubById(id);
        }

        /// <summary>
        /// 增
        /// </summary>
        /// <param name="club"></param>
        /// <returns></returns>
        public int AddClub(Club club)
        {
            return clubDAL.AddClub(club);
        }
        /// <summary>
        /// 改
        /// </summary>
        /// <param name="club"></param>
        /// <returns></returns>
        public int UpdateClub(Club club)
        {
            return clubDAL.UpdateClub(club);
        }
        /// <summary>
        /// 删（改）
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DeleteClub(int id)
        {
            return clubDAL.DeleteClub(id);
        }
    }
}
